package com.huakang.service.impl;


import com.huakang.entity.Ghcx;
import com.huakang.entity.Reginform;

import com.huakang.entity.Ycgh;
import com.huakang.mapper.ReginformMapper;
import com.huakang.service.ReginfornService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ReginfornServiceImpl implements ReginfornService {
    @Autowired
    private ReginformMapper regInformMapper;

    @Override
    public boolean addregin(Reginform reginform) {
        int i = regInformMapper.insertSelective(reginform);
        return i>0?true:false;
    }


    @Override
    public List<Ghcx>  selectbypid(Integer pid) {
        List<Ghcx> ghcxes = regInformMapper.queryByPid(pid);
        return ghcxes;
    }

    @Override
    public List<Ycgh> selectbydid(Integer did) {
        final List<Ycgh> ycghs = regInformMapper.queryByDid(did);
        return ycghs;
    }
}
